//
//  MapViewController.h
//  parkour-photomap-ib
//
//  Created by Ed Mancebo on 4/10/11.
//  Copyright 2011 Personal. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <MapKit/MapKit.h>
@class LinkedList;
@class ImageDetailViewController;

@interface MapViewController : UIViewController <MKMapViewDelegate> {
	UIView *parentView;
	MKMapView *mapView;
	UIScrollView *scrollView;
	ImageDetailViewController *imageDetailViewController;
	
	// model objects
	LinkedList *visibleImages;
	NSMutableDictionary *annotations;
	
	BOOL isCurrentLocationSet;
	MKCoordinateRegion lastUserLocation;
}

@property (nonatomic, retain) UIView *parentView;
@property (nonatomic, retain) MKMapView *mapView;
@property (nonatomic, retain) UIScrollView *scrollView;
@property (nonatomic, retain) ImageDetailViewController *imageDetailViewController;

+ (MapViewController*) getInstance;

- (NSDictionary*) getImageIdSet;
- (void) addVisibleImages:(NSArray*)pkImages;
- (void) removeImagesOutsideMinCoord:(CLLocationCoordinate2D)minCoord maxCoord:(CLLocationCoordinate2D)maxCoord;

- (void) onThumbTap:(UIGestureRecognizer*)gestureRecognizer;
- (void) showDetailViewForImage:(id)sender;

- (double) distBetween:(CLLocationCoordinate2D)coordA coordB:(CLLocationCoordinate2D) coordB;
- (void) nearestNeighborSort;

@end
